package com.quanta.edaily.pojo;

import jakarta.validation.constraints.Pattern;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserDTO {
    @Length(min = 1 ,message = "姓名不能为空")
    private String name;
    @Pattern(regexp = "^\\d{10}$", message = "账号格式有误")
    private String edailyId;
    @Pattern(regexp = "^1\\d{10}$", message = "手机号格式有误")
    private String phone;
    @Pattern(regexp = "^(?=.*[a-zA-Z])(?=.*\\d).+$", message = "密码至少包含一个字母和一个数字")
    private String password;
}
